package com.datasource.controller;

import com.datasource.service.IRoleService;
import com.datasource.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author fyy
 * @Description
 * @Date 2020/6/4 9:19
 */
@RestController
public class DataSourceController {

    @Autowired
    private IUserService userService;
    @Autowired
    private IRoleService roleService;

    @GetMapping("/")
    public Object index(){
        return userService.getAll();
    }

    @GetMapping("/role")
    public Object indexRole(){
        return roleService.getAllRole();
    }

}
